//
//  TimeViewController.swift
//  iPhone
//
//  Created by Toj on 5/12/23.
//

import UIKit


private var preTime = CFAbsoluteTimeGetCurrent()
class TimeViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        
        view.backgroundColor = .random
        
        print("-->toj: time:\(preTime)")
        // 读取的是系统时钟时间
        let time = CFAbsoluteTimeGetCurrent()
        print("-->toj: time:\(time)")
   
        let c = time - preTime
        preTime = time
        print("-->toj: 时间差time:\(c)")
        // Do any additional setup after loading the view.
    }
    

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destination.
        // Pass the selected object to the new view controller.
    }
    */

}
